package com.wytec.xywzxw.service.impl;

import java.util.List;
import com.wytec.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wytec.xywzxw.mapper.XwVersionMapper;
import com.wytec.xywzxw.domain.XwVersion;
import com.wytec.xywzxw.service.IXwVersionService;

/**
 * 版本更新Service业务层处理
 * 
 * @author xywzxw
 * @date 2025-10-28
 */
@Service
public class XwVersionServiceImpl implements IXwVersionService 
{
    @Autowired
    private XwVersionMapper xwVersionMapper;

    /**
     * 查询版本更新
     * 
     * @param id 版本更新主键
     * @return 版本更新
     */
    @Override
    public XwVersion selectXwVersionById(String id)
    {
        return xwVersionMapper.selectXwVersionById(id);
    }

    /**
     * 查询版本更新列表
     * 
     * @param xwVersion 版本更新
     * @return 版本更新
     */
    @Override
    public List<XwVersion> selectXwVersionList(XwVersion xwVersion)
    {
        return xwVersionMapper.selectXwVersionList(xwVersion);
    }

    /**
     * 新增版本更新
     * 
     * @param xwVersion 版本更新
     * @return 结果
     */
    @Override
    public int insertXwVersion(XwVersion xwVersion)
    {
        xwVersion.setCreateTime(DateUtils.getNowDate());
        return xwVersionMapper.insertXwVersion(xwVersion);
    }

    /**
     * 修改版本更新
     * 
     * @param xwVersion 版本更新
     * @return 结果
     */
    @Override
    public int updateXwVersion(XwVersion xwVersion)
    {
        xwVersion.setUpdateTime(DateUtils.getNowDate());
        return xwVersionMapper.updateXwVersion(xwVersion);
    }

    /**
     * 批量删除版本更新
     * 
     * @param ids 需要删除的版本更新主键
     * @return 结果
     */
    @Override
    public int deleteXwVersionByIds(String[] ids)
    {
        return xwVersionMapper.deleteXwVersionByIds(ids);
    }

    /**
     * 删除版本更新信息
     * 
     * @param id 版本更新主键
     * @return 结果
     */
    @Override
    public int deleteXwVersionById(String id)
    {
        return xwVersionMapper.deleteXwVersionById(id);
    }
}
